<#include "/com/uikoo9/util/jfinal/view/common/inc.html"/>

<form class="form-horizontal" role="form" id="form${(teamid)!}" >
<input type="hidden" name="row.teamid" value="${teamid!}"/>
<div class="row">
    <div class="col-xs-5 col-sm-5 col-md-5 col-lg-5" style="height:100px;overflow-y:auto;">
        <p>组员</p><@bsinput title='' name='row.cuser1' id='yuser1' value=''/>

    </div>
    <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2">
        <div style="positoin:absolute;top:50%;height:100px;margin-top:50px;">
        </div>
    </div>
    <div class="col-xs-5 col-sm-5 col-md-5 col-lg-5" style="height:100px;overflow-y:auto;">
        <p>组长</p><@bsinput title='' name='row.cuser2' id='yuser2' value=''/>
    </div>
    <div style="padding: 15px;text-align: right;">
        <@bsbutton id="sortbtn${(teamid)!}" size='md' icon='send'>go</@bsbutton>
    </div>
</div>
</form>
<script type="text/javascript">
    $(function(){
        $("#yuser1").ci_autocomplate_cache("/y/c/autousercache",true);
        $("#yuser2").ci_autocomplate_cache("/y/c/autousercache",false);
        ci.ajax("/y/c/getAutoUser",{"teamid":"${teamid!}"},function(result){
//            ci.alert(result);
            $("#yuser1").ci_autocomplate_update(result.memberids,result.membernames);
            $("#yuser2").ci_autocomplate_update(result.leaderids,result.leadernames);
        });
    });
    $("#sortbtn${(teamid)!}").kq_bind("click",function(){
                ci.ajax("/y/c/saveteam",$.collectObj("#form${(teamid)!}"),function(result){
//                    ci.alert(result);
                });
            }
    );
</script>